package org.example.hadoop;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;

/**
 * @Author: Lian Jingwei
 * @Date: 2020/7/11 19:24
 * @Version: 1.0
 */
public class NumMapper extends Mapper<LongWritable, Text,LongWritable, NullWritable> {
    @Override
    protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {

        context.write(new LongWritable(Long.valueOf(value.toString())),NullWritable.get());
    }
}
